package com.server.feignApi;

import com.comm.entity.po.LoginUserInfo;
import com.comm.result.ResponseResult;
import com.server.config.FeignConfig;
import com.server.fallback.BusinessUserApiFallbackImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @Description: TODO
 * @Author: mis_wu
 * @Date: 2022/9/27
 **/
@FeignClient(value = "${cloud-business-server-name}",contextId = "businessUserBack",fallbackFactory = BusinessUserApiFallbackImpl.class,configuration = FeignConfig.class)
@RequestMapping("/business")
public interface BusinessUserApi {

    @PostMapping("/toLogin")
    ResponseResult<LoginUserInfo> userLoginVerify(@RequestBody LoginUserInfo loginUserInfo);

    @GetMapping("/sendSmsCodeByPhone")
    ResponseResult<Boolean> sendSmsCodeByPhone(@RequestParam String phone);

    @GetMapping("/sendEmailCodeByEmail")
    ResponseResult<Boolean> sendEmailCodeByEmail(@RequestParam String email);

}
